<h1>Order #<%= @order.id%></h1>
<h2><b>Order Details</b></h2>
<p>
	Order total: $<%= sprintf("%0.2f", @order.total) %><br>
	Items in this order (click on item name to view):<br>
	<% for item in @order.order_items %>
		<%= link_to item.artwork.name, item.artwork %> - 
		Amount: <%= item.amount %>,
		$<%= sprintf("%0.2f", item.price * item.amount) %><br>
<% end %>
</p>
<h2><b>Contact Information</b></h1>
<p>
	E-mail address: <%= @order.email %><br>
	Phone number: <%= @order.phone_number %>
</p>
<h2><b>Shipping Information</b></h2>
<p>
	<%= @order.first_name %> <%= @order.last_name %><br>
	<%= @order.address1 %><br>
	<%= @order.city %>, <%= @order.state %> <%= @order.zip %> <%= @order.ship_to_country %>
</p>
<h2><b>Comments on Order #<%= @order.id%></b></h2>
<p>
<% for comment in @order.order_commentss %>
	Posted by <%= comment.created_by %> on <%= comment.created_at %>:<br>
	<%= comment.comment %><br>
<% end %>
</p>
<h2><b>Actions</b></h2>
<p>
	<% if @order.status == "open" || @order.status == "paid" %>
		<% form_for :order, @order, :url => { :action => "shipped", :id => @order.id } do |f| %>
		    Admin ID: <%= f.text_field :last_edited_by %>
			<%= submit_tag 'Mark as Shipped' %>
	  	<% end %>
	<% end %>
	<% if @order.status == "shipped"%>
		<% form_for :order, @order, :url => { :action => "close", :id => @order.id } do |f| %>
		    Admin ID: <%= f.text_field :last_edited_by %>
			<%= submit_tag 'Close Order' %>
	  	<% end %>
	<% end %>
	<% form_for :order_comment, @order_comment, :url => { :action => "new_comment", :id => @order.id } do |f| %>
	    Comment: <%= f.text_field :comment %>
		Your Name: <%= f.text_field :created_by %>
		<%= submit_tag 'Save' %>
	<% end %>
</p>
	